package com.backend;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.io.File;
import java.util.Arrays;
import java.util.List;

@SpringBootApplication
public class BackendApplication {

    public static String ROOT = "/root/j2ee/";
    public static String MOVIE_PATH = ROOT+"movie/";
    public static void main(String[] args)
    {
        List<String> list = Arrays.asList(ROOT,MOVIE_PATH);
        for(String path : list){
            File file =  new File(path);
            if(!file.exists()){
                file.mkdirs();
            }
        }

        SpringApplication.run(BackendApplication.class, args);
    }

}
